package edu.scut.autoProcessor.dao;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ibatis.session.SqlSession;

import edu.scut.autoProcessor.po.AppPo;

public class AppDao extends AbstractDao{

	private static final Log log = LogFactory.getLog(AppDao.class);
	
	@SuppressWarnings("unchecked")
	public static List<AppPo> queryAll(){
		SqlSession sqlSession = factory.openSession();
		
		try{
			return sqlSession.selectList("alertProcessor.appMapper.selectAllApp");
		}catch(Exception e){
			log.warn(e.getMessage());
			e.printStackTrace();
			return null;
		}finally{
			sqlSession.close();
		}
	}
}
